﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Sealight.Core.DataAdapter;
namespace Sealight.Core.Domain
{
   public class ProjectEntity
    {
       public virtual Guid ProjectID { get; set; }

       public virtual string Title { get; set; }
       public virtual string ImageURL { get; set; }
       public virtual string Keyword { get; set; }
       public virtual int NumberView { get; set; }
       public virtual string Description { get; set; }
       public virtual string Detail { get; set; }
       public virtual bool IsActive { get; set; }
       public virtual DateTime CreatedDate { get; set; }
       public virtual DateTime UpdatedDate { get; set; }
       public virtual DateTime PublishedDate { get; set; }
       public virtual ProjectCategoryEntity ProjectCategory { get; set; }
       public virtual LanguageEntity Language { get; set; }
       public virtual project  ToDataAdapter()
       {
           project entity = new project
           {
               id = this.ProjectID,
               title = this.Title,
               image_url = this.ImageURL,
               keyword = this.Keyword,
               number_view = this.NumberView,
               description = this.Description,
               detail = this.Detail,
               is_active = this.IsActive,
               created_date = this.CreatedDate,
               updated_date = this.UpdatedDate,
               published_date = this.PublishedDate,
               language =this.Language!=null ? this.Language.ToDataAdapter():null,
               category =this.ProjectCategory!= null? this.ProjectCategory.ToDataAdapter():null
           };

           return entity;
       }
    }
}
